package com.nifostasky.controller;

import com.nifostasky.entity.Student;
import com.nifostasky.service.StudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/studentTwo")
public class StudentTwoController {
    @Autowired
    private StudentService studentService;

    /**
     * 根据id查询学生信息
     */
    @GetMapping("/queryUserById/{id}")
    public Student queryUserById(@PathVariable("id")Integer id){
        System.out.println("========================调用8888服务提供者:queryUserById===============================");
        return studentService.queryUserById(id);
    }
}
